package com.cj.ctyl.framework.core.page;

import com.cj.ctyl.framework.constant.Constants;
import com.cj.ctyl.framework.utils.ServletUtils;

/**
 * @Author: Alex
 * @Description: 表格数据的处理类
 * @Date: 2021/8/25
 */
public class TableSupport {

    public static PageDomain buildPageRequest() {
        PageDomain pageDomain = new PageDomain();
        pageDomain.setPageNum(Integer.parseInt(ServletUtils.getRequest().getParameter(Constants.PAGE_NUM)));
        pageDomain.setPageSize(Integer.parseInt(ServletUtils.getRequest().getParameter(Constants.PAGE_SIZE)));
        pageDomain.setOrderByColumn(ServletUtils.getRequest().getParameter(Constants.ORDER_BY_COLUMN));
        pageDomain.setIsAsc(ServletUtils.getRequest().getParameter(Constants.IS_ASC));
        return pageDomain;
    }
}
